<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMarketExpensesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('market_expenses', function (Blueprint $table) {
            $table->id();
            $table->string('plateform_name')->default('')->comment('平台名称');
            $table->decimal('amount',10,2)->default(0.00)->comment('金额');
            $table->string('mark')->default('')->comment('备注');
            $table->tinyInteger('type')->default(1)->comment('1营销2违章');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `market_expenses` comment '营销费用'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('market_expenses');
    }
}
